#ifndef SECURITY_H_INCLUDED
#define SECURITY_H_INCLUDED


#define USER_AUTH_FAIL -1
#define USER_AUTH_SUCESS 1
#define SYSTEM_ERR 2
#define USER_SESSION_FAIL 3
#define USER_CREDENTAIL_FAIL 4

#if defined OS_LINUX
#include <security/pam_appl.h>
#include <security/pam_misc.h>
#include <pwd.h>
#define MAX_LEN_PWD 512
#endif

#if defined OS_LINUX

typedef struct sessionUser{
    pam_handle_t *p_pamhdl;
    struct pam_conv pam_conv;
    struct passwd pwd;
    time_t lastUpTime;
    char *username;
}sessionUser;

#endif


#endif // SECURITY_H_INCLUDED
